import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/login'
import Home from '@/components/home'
Vue.use(VueRouter)

const routes = [
  // 路由重定向
  { path: '/', redirect: '/login' },

  // 普通路由
  { path: '/login', component: Login },
  { path: '/home', component: Home }
]

const router = new VueRouter({
  routes
})

export default router
